home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
diskmags
/
4671-5.790
/
dmg-5160
/
stosser
/
bitsbats.doc
/
bitsbats.doc
Wrap
Text File
|
1995-03-16
|
11KB
|
265 lines
#*~d
( Felt like writing an article but didn't know what about )
By Tony Greenwood for STOSSER
There are a couple of ACBs about that are supposed to help you find out
what sort of a crash you have had. Lets say your routine stops suddenly
and gives you an "error 84 in line 1000" or any other error message, or
you have made an error trap that prints the ERRN and ERRL (Error number
and Error line?) What do you do, well the ACB's in question allow you to
input a number and the actual error message will be printed to the screen
for you. In this example it would be "Extension not present." Well for a
long time I personally used the manual and simply looked up the number to
see what the problem was, this itself was a pain because the numbers are
not in order, the messages are, but that's useless when the only info you
have is the number.
Now there are some clever clogs out there that know what I am getting at
here, but there are those that will be doing as I used to or using an
ACB, but for exactly the same results all you have to do is type "ERROR"
followed by the error number. So if you do get error 84 then type error
84 and the same message that's in the manual will appear, or for even
simpler results try "PRINT ERROR ERRN"
[Ahem.. Erm.. Nice one. Why the &^*$% didn't I think of that? Bob.]
#*~e
Why not use a pencil to mark your floppy disk labels? I get sent quite a
few disks through the post and they nearly all have some sort of writing
on them. If I want to re use the disk then I have to relabel it, or if
its already been relabeled then I have to peel the label off. The same
goes for any re-using of disks, but if a pencil had been used in the
first place then all we have to do is use an eraser (without being too
aggressive to the floppy) and erase the title and use a pencil on it
again, the simplest ideas are the best!!
#*~e
Mineralised methylated spirits plus some cotton buds, that's all you need
to bring your mouse back to life. You probably don't even realise it
needs it, follow these easy instructions and I can practically guarantee
you will notice the difference, especially in the speed.
Turn your mouse over, in the centre you will find the actual ball and you
will find a cover, this (in all the ones I have ever seen) has printed on
it how to open it. It's just a case of turning it (or sliding it), the
only loose thing in there is the ball, so don't be afraid to open it up.
Now look inside and you will see that there are three small steel runners
set in a triangular pattern, i.e. 3 evenly spaced, just dip your cotton
bud into the meths and clean the silver bits, just place the bud on the
ball, press on and draw back towards you, this will clean that bit and
turn the runner so you can clean the next bit. Do that with all three
then replace the ball and watch that mouse go.
The first actual wipe you do on the first roller - STOP! Look at the bud
before continuing, if its been ages since its been cleaned then the
chances are that it's black and you need to use another bud or something.
Don't rub a dirty cotton bud back on the track.
The meths is actually pretty strong stuff, get a clean bud and dip it in
the meths and rub your st with it, just watch the dirt that you didn't
even know was there come off.
[A word of caution just like the big-boys do: Test this on an
inconspicuous section of your ST - Just in case your ST has a funny case
and decides to melt! Personally I use TipExx thinner as I never have
meths. (Well only on special occasions) Bob.]
#*~e
FASTCOPY the Missing links screencopy command seems to be the fastest. I
did a time test comparing fastcopy, screencopy, blit and kopy. Then I
tried fastcopy, blit and kopy using a variable as the source address as
opposed to start(bank). Altogether it was fastcopy with the variable that
won, this is for full screen copying of course.
#*~e
How about the missing links WORLD MAPS, anyone using them? Personally I
think they are great, but what if you make a very large map for your
game, it would help if you knew where everything was at a glance. How
about a smaller version of the map? Well you could use the "WHICH BLOCK
command to make a scaled down version, what you would need to do is use X
LIMIT and Y LIMIT to find the size of the map, then make a double loop
to find out what every single block is. Something like:
FOR N=0 TO X : FOR NN = 0 TO Y
As you find WHICH BLOCK you would then do something like the following,
W=WHICH BLOCK (START(5),N,NN) : rem presuming map data in bank 5
IF W=0 THEN SPOT LOGIC,N,NN,0 : rem presumes block 0 was a blank
IF W>0 THEN SPOT LOGIC,N,NN,1 : rem all other blocks
NEXT NN : NEXT N
The above should (this is done from memory so underline SHOULD) draw out
a small mono picture of any size map onto the top left of your screen.
For even better results you can assign all 15 colours to different
blocks. So lets say there are some switches on your map, these are made
with block 31 for example, simply add the line
IF W=31 THEN SPOT LOGIC,N,NN,2 : rem different colour for switches
As you are the only one who knows what block= what then only you know
what IF statements to put in, but it is a handy little routine. Thanks to
Bob for making the original and drawing my attention to this nifty idea.
#*~e
Staying with the MISSING LINK for a second (well it is a big part of STOS
isn't it?) As you will probably know, the BOBS, JOEYS, TILES, WORLD
BLOCKS etc are all made from sprites, where a sprite bank holds one image
and is then pre-shifted. The TML equivalents are pre-shifted and
therefore the banks are multiplied in size by the amount of images
selected. If you are making a program that uses 1 pixel scrolling or
similar and all your graphics are saved as 16 images then you are going
to have very very large files on your disk. There are two ways around
this problem: The most simple is to pack the banks, they pack down
remarkably well, I have personally never seen anything shrink so much in
size, [Fwoar!? Bob.] You could use ATOMIK (given away in an earlier
STOSSER) and then use the TML's own unpacking routine to unpack them.
This will save on a lot of disk space, but there is another sneakier way
that's a little more flexible depending on your program/game.
The actual MAKE utility that converts and pre-shifts everything comes as
a BASIC file, you should also have it as a .PRG and be able to see the
speed it converts. well break into the BASIC file and simply copy the
actual conversion routine. Use it as a sub routine in your game/program,
then you can have your sprites as normal in bank one, then as your game
loads it will quickly convert to BOBS or whatever thus NO disk space used
at all.
One advantage this could have is by doing a check on boot up to see if
the user has a half meg machine or more (EXTRA extension will do this)
and then convert your sprites accordingly. I doubt a half meg machine
could handle a large set of BOBs or world blocks converted to 16 images?
So users with more than half a meg could have a more enhanced smoother
scrolling version. The only other way to achieve this would be to have
two sets of previously converted sprites on disk.
#*~e
When naming VARIABLES there are a few obvious restrictions, i.e. using
commands as variable names, a nice neat coder (not me!) would preferably
like to name his variables so as to instantly know what they are used
for. SCORE=0 : this would be nice and neat but not valid because of the
command OR in the middle, but this would look as good and would work:
SC0RE=0 : just in case you are viewing this with an odd font let me
explain that I have simply replaced the letter O with a
numeric 0,
LIFE=0 : again would not work because of IF, but this would,
L1FE=0 : I have changed the letter I for the number 1, so you see
you can
have easy to read variables by replacing key letters with numbers.
#*~e
Beware of using the HARDKEY command from the missing link extension if
you are using the mouse at the same time. I had a menu that used the
mouse to choose things, but also keyboard shortcuts. One of these was ESC
to quit, it took me a while to figure out why the program kept quitting
and no error message - it was the mouse movement returning 1 into
HARDKEY. To see what I mean try the following:
REPEAT : PRINT HARDKEY : UNTIL FALSE
You will need to press CONTROL+C to exit but you will see HARDKEY
returning numbers when the mouse is moved.
#*~e
Well, well I am surprised, looks like I am probably a bit slow as well. I
have had my ST for a while now, and I've just found a shortcut that I
never knew about. If you open two windows on your desktop having one for
drive A and the other for either drive B or a ram disk, and you want to
copy some files across from one window to the other, lets say from window
A, you would simply highlight the file then drag across. If you wanted
all the files you can highlight them all by holding the mouse key and
running it over the files, that's all dandy, but! What if you have a list
of 7 files for example, and you only want to copy the first, third,
fourth and seventh? Well I have just found out that you highlight one
then whilst holding the SHIFT key you can then highlight any others and
they don't have to be sequential, then just drag them across as normal.
A lot of you will read the above and be wondering why I am stating what
is blatantly obvious to you, well the reason is that if I have only just
found this out then there may be others out there that didn't know.
[Just a short bit of general hinty thing; No matter what program you are
using you should try the SHIFT+MOUSE BUTTON combo, it's surprising how
many programs use this for multiple object selections e.g. Calamus,
WINDOWS(!?), EZDraw etc. etc. Bob.]
#*~e
And that's about it for now, I have to say that its becoming a little
demoralising writing articles for STOSSER, the problem is not knowing how
many people are reading it, let alone getting anything out of it. I am
not asking for people to write and thank us for articles, but do send a
note to the letters page letting us know if it helps. I am not just
talking about my bits, it's the other contributers as well who simply
don't know if their time and effort is actually any use to anyone, just
let us know if the articles are helping...
.........!ynoT